package com.jshcbd.modules.asset.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.jshcbd.common.jsonserializer.Decimal2Serializer;
import com.jshcbd.framework.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zhoucd
 * @date
 * @description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel( description = "资产领用记录")
public class AssetUseVo implements Serializable {
    private static final long serialVersionUID = 1L;

    private String id;


    @ApiModelProperty(value = "领用人",required=true)
    @NotNull
    private String receiver;

    @ApiModelProperty(value = "领用日期",required=true)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date receiveDate;


    @ApiModelProperty(value = "联系电话",required=true)
    private String telphone;

    @ApiModelProperty(value = "公司Id",required=true)
    private String companyId;

    @ApiModelProperty(value = "总价格",required=true)
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal sumPrice;


    @ApiModelProperty(value = "归还期限",required=true)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull
    private Date dueDate;

    @ApiModelProperty(value = "单位楼")
    @Dict(dicCode = "building")
    private Integer locationBuilding;

    @ApiModelProperty(value = "楼层")
    private Integer locationFloor;


    @ApiModelProperty(value = "备注")
    private String  note;

    @ApiModelProperty(value = "领用类型(1:领用/2:转移/3:续期)")
    private Integer type;

    @ApiModelProperty(value = "公司名称")
    private String companyName;



}
